In 3D computer graphics, a polygon model, in which 3D objects are generally represented by a larger number of polygons, is employed. In rendering objects using a polygon model, shading is performed in which the surface of polygons are shaded in consideration of light sources, view points and the reflectivity of objects' surfaces. In order to generate a photorealistic image, texture mapping, in which a texture image is mapped to the surface of polygon model, is performed.
In order to reduce the volume of data for texture images, the index color scheme is sometimes employed in which indexes representing color values are provided instead of providing each texel with a color value. A color lookup table is referred to at the time of texture mapping so that the index is converted into an actual color value. The color lookup table is alternatively referred to as a color palette. A color sample in which color values are defined is provided in the form of a color lookup table or a color palette, allowing a texel to store only index information for referring to a color lookup table. For example, given that a color sample used comprises 256 colors, each texel in a texture image has only to store an index of 8 bits. Given a color sample of 16 colors, a texel has only to store an index of 4 bits. Thus, the volume of data for texture images is remarkably reduced.
In texture mapping using a texture image provided in the index color format, the size of a color lookup table should be as small as possible for efficient use of memory. In order to maintain high rendering quality, however, a certain number of colors are necessary in a color sample. On the other hand, the number of colors can be small for an area that need not be rendered in great detail. A general approach is to provide a single, large color lookup table to accommodate a larger number of colors. Then, the same palette is equally used for indexing of color values even in an area that need not be rendered in great detail, resulting in less efficient use of memory.